<HTML>
  <HEAD>
    <TITLE>threadpool Documentation</TITLE>
    <LINK HREF="threadpool.css" REL="stylesheet" TYPE="text/css">
  </HEAD>
  <BODY BGCOLOR="#FFFFFF">
    <DIV CLASS="qindex">
      <TABLE BORDER="0" WIDTH="100%">
        <TR>
          <TD ALIGN="LEFT">
            <B>threadpool</B>
          </TD>
          <TD ALIGN="RIGHT">
            <A CLASS="qindex" HREF="index.html">Overview</A> |
            <A CLASS="qindex" HREF="reference/annotated.html">Reference</A> |
            <A CLASS="qindex" HREF="tutorial/intro.html">Tutorial</A> |
            <A CLASS="qindex" HREF="examples/intro.html">Examples</A> |
            <A CLASS="qindex" HREF="design/intro.html">Design</A>
          </TD>
        </TR>
      </TABLE>
    </DIV>
    <DIV CLASS="qindex">
      <TABLE BORDER="0" WIDTH="100%">
        <TR>
          <TD ALIGN="LEFT">
            <B>Overview</B>
          </TD>
          <TD ALIGN="RIGHT">
            <A CLASS="qindex" HREF="index.html">Main Page</A> |
            <A CLASS="qindex" HREF="changelog.html">Change Log</A> |
            <A CLASS="qindex" HREF="license.html">Software License</A>
          </TD>
        </TR>
      </TABLE>
    </DIV>
<!-- Generated by Doxygen 1.6.1 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Search');
--></script>
<div class="contents">
<h1>threadpool</h1><h3>0.2.5 </h3><h2><a class="anchor" id="intro_sec">
threadpool</a></h2>
<p>threadpool is a cross-platform C++ thread pool library. In general terms thread pools are an efficient mechanism for asynchronous task processing within the same process. They realise the <a href="design/pattern.html">thread pool pattern</a>.</p>
<p>A thread pool manages a group of threads in order to process a large number of tasks. Since multiple threads can be executed in parallel this approach may be very efficient regarding the overall program performance on many computer systems. By restricting the number of threads and by reusing them resources are saved and additionally the system stability is increased.</p>
<p>The threadpool library provides a convenient way for dispatching asynchronous tasks. Pools can be customized, managed dynamically and easily integrated into your software.</p>
<h2><a class="anchor" id="dev_status_sec">
Development Status &amp; Future Work</a></h2>
<p>The threadpool core classes are completed and the implemenation can be considered ready for production code. The library is used by several commercial server applications and can handle high workload without problems. I'm currently working on helper and service classes which make the usage of the pool more comfortable. A small tutorial introduces the thread pool and more example code will be added in the future. The documentation is far away from being finished. <br/>
 <br/>
<a href="http://threadpool.cvs.sourceforge.net/threadpool/threadpool">Browse CVS Repository</a> <br/>
</p>
<p>Features</p>
<ul>
<li>Policy-based thread pool implementation<br/>
</li>
<li>Scheduling policies: fifo, lifo and priority<br/>
</li>
<li>Size policies: static_size<br/>
</li>
<li>Size policy controller: empty_controller, resize_controller<br/>
</li>
<li>Shutdown policies: wait_for_all_tasks, wait_for_active_tasks, immediately<br/>
</li>
<li>Smooth integration into STL and boost<br/>
 </li>
</ul>
<p>Future Work</p>
<ul>
<li>More policies: deadline_scheduler, ...<br/>
</li>
<li>Possibility of limiting the number of pending tasks<br/>
</li>
<li>Futures (handles to results of scheduled functions)<br/>
</li>
<li>More examples to illustrate the usage of the library<br/>
</li>
<li>Provide Unit tests<br/>
 </li>
</ul>
<h2><a class="anchor" id="down_sec">
Download Section</a></h2>
<p>threadpool 0.2.5 (Development Snapshot)</p>
<ul>
<li><a href="http://prdownloads.sourceforge.net/threadpool/threadpool-0_2_5-src.zip?download">threadpool-0_2_5-src.zip</a><br/>
</li>
<li><a href="http://prdownloads.sourceforge.net/threadpool/threadpool-0_2_5-doc.zip?download">threadpool-0_2_5-doc.zip</a><br/>
 </li>
</ul>
<p>For more information on the revisions see <a class="el" href="changelog.html">Change Log</a>.</p>
<h2><a class="anchor" id="platforms_sec">
Supported Platforms</a></h2>
<p>threadpool is highly portable. It runs on any platform on which Boost threads are available: Linux, Windows, Mac OS 9/X, Solaris, etc.</p>
<h2><a class="anchor" id="boost_sec">
Boost Libraries</a></h2>
<p>Boost is a collection of high-quality C++ libraries and works on almost any modern operating system, including UNIX and Windows variants. In fact threadpool is only a small extension to the portable Boost source libraries. It incorporates the thread pool concept by using the thread library from William Kempf. For more information on this excellent library visit <a href="http://www.boost.org">Boost.org</a>.</p>
<h2><a class="anchor" id="installation_sec">
Installing &amp; Using threadpool</a></h2>
<p>threadpool consists only of header files, and so there is no need to build the library itself before using it in your own applications. You simply need to add the following directories to your compiler include path:<br/>
</p>
<ul>
<li>threadpool's include directory<br/>
</li>
<li>the boost directory (e.g. the one called boost_1_37_0)<br/>
</li>
</ul>
<p>Furthermore you have to compile boost's thread library and link against it (libboost_thread-*.lib under Windows).</p>
<h2><a class="anchor" id="license_sec">
Software License</a></h2>
<p>threadpool is released under the <a class="el" href="license.html">Boost Software License</a>. This license encourages both commercial and non-commercial use.</p>
<h2><a class="anchor" id="acknowledgments_sec">
Acknowledgments</a></h2>
<p>This library was written by Philipp Henkel. </p>
<p>I appreciate your suggestions, and would love to know if you use threadpool. Hopefully you will enjoy it and find it useful. Please post questions, comments, bugs, or contact me at:</p>
<p><a href="mailto:threadpool@googlemail.com">threadpool@googlemail.com</a><br/>
 or<br/>
 <a href="http://www.sourceforge.net/projects/threadpool">www.sourceforge.net/projects/threadpool</a> <br/>
 <br/>
 </p>
</div>
<!--- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

    <BR>
    <DIV CLASS="qindex">
      <TABLE BORDER="0" WIDTH="100%">
        <TR>
          <TD CLASS="tiny" ALIGN="LEFT">Copyright &copy 2005-2008 Philipp Henkel</TD>
          <TD ALIGN="RIGHT">
            <A CLASS="qindex" HREF="index.html">Overview</A> |
            <A CLASS="qindex" HREF="reference/annotated.html">Reference</A> |
            <A CLASS="qindex" HREF="tutorial/intro.html">Tutorial</A> |
            <A CLASS="qindex" HREF="examples/intro.html">Examples</A> |
            <A CLASS="qindex" HREF="design/intro.html">Design</A>
          </TD>
        </TR>
      </TABLE>
    </DIV>
  </BODY>
</HTML>
